package cn.zust.edu.cn;

import cn.zust.edu.cn.service.IShape;

import java.util.ArrayList;
import java.util.List;

public class ShapeManager {
    private List<IShape> shapes=new ArrayList<>();
    public void addShape(IShape shape){
        shapes.add(shape);
    }

    public void delShape(IShape shape){
        shapes.remove(shape);
    }

    public void drawShapes(){
       for(int i=0;i<shapes.size();i++){
           shapes.get(i).draw();
       }
    }
}
